package com.levi.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shentong
 * @since 2022/3/9 10:15 PM
 */
@RestController
@RequestMapping("/aop")
public class TestAopController {

	@RequestMapping("/test")
	public String testAop(String key) {
		return "testAop: key = " + key;
	}

	@RequestMapping("testAfterThrowing")
	public String testAfterThrowing(String key) {
		throw new NullPointerException(key);
	}

	@RequestMapping("/testAround")
	public String testAround(String key) {
		return "环绕通知：key = " + key;
	}

}
